home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1991 July
/
1991-07.d64
/
dungeon trials
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
9KB
|
384 lines
0 clr
1 rem copyright 1991 - compute publications intl ltd - all rights reserved
5 lvl=1:rm=5
10 mf=12:tsf=63
20 for t=1to6
30 ch(t)=0
40 nextt
100 printchr$(147);
110 poke53281,0:poke53280,11
115 printtab(12);"[158]reading data..."
120 forca=12672to12734:readqa:pokeca,qa:next
130 forcb=12736to12798:readqb:pokecb,qb:next
140 forcc=12800to12862:readqc:pokecc,qc:next
150 forcd=12864to12926:readqd:pokecd,qd:next
160 force=12928to12990:readqe:pokece,qe:next
170 forcf=12992to13054:readqf:pokecf,qf:next
180 forda=12288to12350:readza:pokeda,za:next
190 fordb=12352to12414:readzb:pokedb,zb:next
200 fordc=12416to12478:readzc:pokedc,zc:next
210 fordd=12480to12542:readzd:pokedd,zd:next
220 forde=12544to12606:readze:pokede,ze:next
230 fordf=12608to12670:readzf:pokedf,zf:next
235 printchr$(147);
240 v=53248
250 pokev+23,tsf
260 pokev+28,tsf:pokev+37,7:pokev+38,10
270 pokev+0,50:pokev+1,58
280 pokev+2,80:pokev+3,58
290 pokev+4,110:pokev+5,58
300 pokev+6,140:pokev+7,58
310 pokev+8,170:pokev+9,58
320 pokev+10,200:pokev+11,58
330 poke2040,198:poke2041,199
340 poke2042,200:poke2043,201
350 poke2044,202:poke2045,203
360 pokev+21,tsf
370 pokev+39,5:pokev+40,6
380 pokev+41,8:pokev+42,4
390 pokev+43,6:pokev+44,5
400 printchr$(19);
410 poke214,6:print
415 print" 1 2 3 4 5 6"
420 print" "
430 fort=1to8
440 print" ";tab(25);" "
450 next
460 print" "
470 printchr$(19);
480 poke214,8:print
490 fort=1to8
500 print" "
510 next
520 printchr$(19);
530 poke214,8:print
540 printtab(11);"[152][177][178][177][178][177][178]"
550 printtab(11);"[152][178][177][146][169][223][178][177]"
560 printtab(11);"[152][177][178][146] [177][178]"
570 printtab(11);"[152][178][177][146] [178][177]"
580 printtab(11);"[152][177][178][146] [177][178]"
590 printtab(10);"[169] [223]"
600 printtab(9);"[146][169] [223]"
610 printtab(8);"[146][169] [223]"
620 printchr$(19);
630 poke214,10:print
640 printtab(8);"[146][169]";tab(19);"[146][223]"
650 printtab(7);"[146][169] ";tab(19);"[146] [223]"
660 fort=1to2
670 printtab(7);"[146] ";tab(19);"[146] "
680 nextt
690 printtab(7);"[146][175][175]";tab(19);"[146][175][175]"
700 printtab(7);"[146] ";tab(19);"[146] "
710 dm=int(rnd(0)*mf)+1
720 if dm>6 then mc$=" none"
730 ifdm=1thensm=192:mnc=12:mc$=" shadow"
740 ifdm=2thensm=193:mnc=1:mc$=" ghost"
750 ifdm=3thensm=194:mnc=5:mc$=" serpent"
760 ifdm=4thensm=195:mnc=6:mc$="winged warrior"
770 ifdm=5thensm=196:mnc=1:mc$=" skeleton"
780 ifdm=6thensm=197:mnc=2:mc$=" vapor demon"
790 printchr$(19);
910 print
920 printtab(31);"[146]foe"
930 printtab(31);"[146][184][184][184]":print
940 printtab(26);"";tab(26);mc$
950 if dm>6then1100
1010 pokev+23,tsf+64:pokev+28,tsf+64
1020 pokev+37,7:pokev+38,10
1030 pokev+12,124:pokev+13,140
1040 poke2046,sm
1050 pokev+21,tsf+64
1060 pokev+45,mnc
1100 printchr$(19);
1110 poke214,7:print
1120 printtab(29);"[146]options"
1130 printtab(29);"[146][163][163][163][163][163][163][163]"
1140 printtab(29);"f[146]ight"
1150 printtab(29);"n[146]orth"
1160 printtab(29);"s[146]outh"
1170 printtab(29);"e[146]ast"
1180 printtab(29);"w[146]est"
1190 getky$:ifky$=""then1190
1200 if mc$=" none" then 1240
1210 if ky$="f"then 1290
1230 goto1190
1240 if ky$="s"then2200
1250 if ky$="n"then2530
1260 if ky$="e"then2700
1270 if ky$="w"then2900
1280 goto 1190
1290 print chr$(19);
1300 poke214,18:print
1305 printtab(2);"character to"
1310 input" fight with";c
1311 if c>6 then 1320
1312 if c<1 then 1320
1315 if ch(c)=255 then 1320
1317 goto 1400
1320 printtab(2);"that character does not exist!"
1330 printtab(2);"choose again."
1340 foro=1to1000:nexto
1350 printchr$(19);
1360 poke214,18:print
1365 foro=1to4:print" ":nexto
1370 goto 1290
1400 printchr$(19);
1410 poke214,8:print
1420 fort=1to8:printtab(3);" ":nextt
1430 pl=1024:pc=55296
1440 my=124
1450 px=14:py=13
1460 if c=1 then cw=30:wc=9
1470 if c=2 then cw=66:wc=6
1480 if c=3 then cw=30:wc=9
1490 if c=4 then cw=42:wc=4
1500 if c=5 then cw=43:wc=7
1510 if c=6 then cw=30:wc=9
1520 poke53275,255
1530 mdr=int(rnd(0)*2)+1
1560 if mdr=1andmy-4<50then mdr=2
1570 if mdr=2andmy+4>192then mdr=1
1610 if mdr=1 then my=my-8
1620 if mdr=2 then my=my+8
1630 jy=peek(56320)
1640 if jy=127 then1740
1650 if jy=119 then wx=1
1660 if jy=123 then wx=-1
1670 if jy=125 then wy=1
1680 if jy=126 then wy=-1
1690 if jy=111 then 1800
1700 ifpeek(1024+py*40+(px+wx))=160thenwx=0
1705 ifpeek(1024+(py+wy)*40+px)=160then wy=0
1710 poke1024+(py*40)+px,32
1720 px=px+wx
1730 py=py+wy
1740 pokepc+(py*40)+px,3
1750 poke1024+(py*40)+px,91:wx=0:wy=0
1760 pokev+12,my:pokev+13,140
1770 goto 1530
1800 swx=1664
1810 fx=swx+px
1820 for fy=fx to (1024+40*py+px) step-40
1830 pokepc+(fy-1024),wc
1840 pokefy,cw
1850 forgj=1to10:nextgj
1860 pokefy,32:nextfy
1865 if mdr=1 then my=my+8
1870 if mdr=2 then my=my-8
1875 hm=int(my/8)
1880 if py=11 then 1900
1890 if py=12 then 1900
1895 goto 2000
1900 if px+1=hm then 1930
1910 if px+2=hm then 1930
1920 goto 2000
1930 forgj=1to10:fort=0to15
1935 poke v+45,t
1940 nextt:nextgj
1945 pokev+21,tsf
1950 poke53275,0
1960 printchr$(147);
1970 goto 400
2000 if c=1 then vp=39:tsf=tsf-1
2005 if c=2 then vp=40:tsf=tsf-2
2010 if c=3 then vp=41:tsf=tsf-4
2015 if c=4 then vp=42:tsf=tsf-8
2020 if c=5 then vp=43:tsf=tsf-16
2025 if c=6 then vp=44:tsf=tsf-32
2030 ch(c)=255
2040 forgj=1to10:fort=0to15
2050 poke v+vp,t
2060 nextt:nextgj
2070 poke53275,0
2080 pokev+21,tsf
2085 if tsf=0 then 30000
2090 printchr$(147);
2095 goto235
2200 if rm=1 then 10000
2210 if rm=4 then 10000
2220 if rm=5 then 10000
2230 if rm=10 then 10000
2240 if rm=11 then 10000
2250 if rm=12 then 10000
2255 if rm=15 then 10000
2260 if rm=17 then 10000
2270 if rm=18 then 10000
2280 if rm=20 then 10000
2290 if rm=23 then 10000
2310 if rm=24 then 10000
2320 if rm=25 then 10000
2330 if rm=28 then 10000
2340 if rm=29 then 20000
2350 rm=rm+1:goto235
2530 if rm=1 then 10000
2540 if rm=5 then 10000
2550 if rm=6 then 10000
2560 if rm=11 then 10000
2570 if rm=12 then 10000
2580 if rm=13 then 10000
2590 if rm=16 then 10000
2600 if rm=18 then 10000
2610 if rm=19 then 10000
2620 if rm=21 then 10000
2630 if rm=24 then 10000
2640 if rm=25 then 10000
2650 if rm=26 then 10000
2660 if rm=29 then 10000
2670 rm=rm-1:goto235
2700 if rm=2 then 10000
2710 if rm=3 then 10000
2720 if rm=9 then 10000
2730 if rm=11 then 10000
2740 if rm=14 then 10000
2750 if rm=17 then 10000
2760 if rm=18 then 10000
2770 if rm=19 then 10000
2780 if rm=22 then 10000
2790 if rm=26 then 10000
2800 if rm=27 then 10000
2810 if rm=28 then 10000
2820 if rm=25 then 20000
2830 rm=rm+5:goto235
2900 if rm=1 then 10000
2910 if rm=2 then 10000
2920 if rm=3 then 10000
2930 if rm=4 then 10000
2940 if rm=5 then 10000
2950 if rm=7 then 10000
2960 if rm=8 then 10000
2970 if rm=14 then 10000
2980 if rm=16 then 10000
2990 if rm=19 then 10000
3000 if rm=22 then 10000
3010 if rm=23 then 10000
3020 if rm=24 then 10000
3030 if rm=27 then 10000
3040 rm=rm-5:goto235
10000 printchr$(19);
10010 poke214,8:print
10015 fort=1to4
10020 printtab(3);"[152][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178]"
10030 printtab(3);"[152][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177]"
10040 nextt
10050 printchr$(19);
10060 poke214,11:print
10070 printtab(7);"a wall blocks"
10080 printtab(7);" this hall "
10090 for o=1to1000:nexto
10100 goto 235
20000 if lvl=1 then lvl=2:rm=3:goto235
20010 if lvl=2 then lvl=3:rm=18:goto235
20020 if lvl=3 then lvl=4:rm=11:goto235
20030 if lvl=4 then lvl=5:rm=28:goto235
20040 if lvl=5 then 35000
30000 printchr$(19);
30010 poke214,11:print
30020 printtab(7);" game over"
30030 printtab(7);"restart (y/n)"
30040 getky$:if ky$=""then30040
30045 if ky$<>"y"thensys64738
30050 if ky$="y"then restore:goto5
35000 for j=1to10:fort=0to15
35010 printchr$(19);
35020 poke214,11:print
35030 poke646,t
35040 printtab(6);"congratulations!"
35050 nextt:nextj
35060 goto30030
40010 rem--archer (girl) *left--
40020 data1